package com.lg.system.wxmaterial.service;
import java.io.File;
import java.io.IOException;
import java.util.List;

import org.springframework.web.multipart.MultipartFile;

import com.lg.system.wxmaterial.entity.WxMaterial;
import com.lg.utils.R;

import me.chanjar.weixin.common.exception.WxErrorException;

import com.baomidou.mybatisplus.service.IService;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author dl
 * @since 2018-04-08
 */
public interface WxMaterialService extends IService<WxMaterial> {

	 /**
	 * <p>
	 * 新增服务
	 * </p>
	 */
    boolean save(WxMaterial wxMaterial);

     /**
	 * <p>
	 * 更新服务
	 * </p>
	 */
	boolean update(WxMaterial wxMaterial);
	
	 /**
	 * <p>
	 * 删除服务
	 * </p>
	 */
	boolean deleteById(Long id);
	
	 /**
	 * <p>
	 * 批量删除服务
	 * </p>
	 */
	boolean deleteByIds(List<Long> ids);

	boolean upload(MultipartFile files, String type,WxMaterial wxMaterial) throws IOException,WxErrorException;


	/** 
	* @Description: 上传图文消息内的图片获取该图片在微信服务器地址
	* @param @param path
	* @param @return  
	* @return String 
	* @throws 
	*/ 
	R mediaImgUpload(String path) throws WxErrorException;
	
	R mediaImgUpload(MultipartFile file) throws WxErrorException,IOException;
}
